function t = checkmed(photon_xyz)
if(photon_xyz(1,3)>=0)
    t=1;
else
    t=0;
end